package net.pm.core.service;

import java.util.List;
import java.util.Map;

import net.pm.common.service.GenericServicer;
import net.pm.common.toolkit.PMRetcodeGenerator;
import net.pm.core.entities.db.Collarmaterial;

public interface CollarMaterialServicer extends GenericServicer<Collarmaterial, Long>{
	
	/**
	 * 创建订单的领料信息并记录日志
	 * @param collarmap
	 * @param orderId
	 * @return
	 */
	Long createCollarAndLog(Map<Long,Integer> collarmap,Long productId,Long userId);
	Long create_collarandlog_success = PMRetcodeGenerator.next();
	Long create_collarandlog_failed = PMRetcodeGenerator.next();
	
	
	/**
	 * 创建订单的领料信息
	 * @param collar
	 * @return
	 */
	Long createCollar(Collarmaterial collar);
	Long create_collar_success = PMRetcodeGenerator.next();
	Long create_collar_failed = PMRetcodeGenerator.next();
	
	List<Long>  findCollarIdsByProductId(Long productId);
}
